/**
 * Yolema.com Inc.
 * Copyright (c) 2011-2012 All Rights Reserved.
 */
package org.grayrabbit.pay.core.biz.manager.transaction;

import java.util.Date;
import org.grayrabbit.pay.core.model.results.PayResult;
import org.grayrabbit.pay.core.model.results.GenericsResult;
import org.grayrabbit.pay.core.model.pages.PageList;
import org.grayrabbit.pay.core.model.entity.transaction.TradeHistory;

/**
 * 
 * 
 * @author liyd
 * @version $Id: TradeHistoryManager.java, v 0.1 Fri Jun 01 11:16:04 CST 2012 liyd Exp $
 */
public interface TradeHistoryManager {

    /**
     * 查询业务列表
     * 
     * @param tradeHistory
     * @return
     */
    public GenericsResult<PageList<TradeHistory>> queryPageList(TradeHistory tradeHistory);

    /**
     * 查询业务列表
     * @param tradeHistory
     * @param startDate
     * @param endDate
     * @return
     */
    public GenericsResult<PageList<TradeHistory>> queryPageList(TradeHistory tradeHistory,
                                                                Date startDate, Date endDate);

    /**
     * 根据Id得到实体对象
     * 
     * @param id
     * @return
     */
    public GenericsResult<TradeHistory> getById(Long id);

    /**
     * 根据id批量删除
     * 
     * @param idArray
     * @return
     */
    public PayResult deleteBatchById(Long[] idArray);

    /**
     * 添加一个对象
     * 
     * @param tradeHistory
     * @return
     */
    public GenericsResult<TradeHistory> insert(TradeHistory tradeHistory);

    /**
     * 更新一个对象
     * 
     * @param tradeHistory
     * @return
     */
    public GenericsResult<Integer> update(TradeHistory tradeHistory);

    /**
     * 删除一个对象
     * 
     * @param tradeHistory
     * @return
     */
    public PayResult delete(TradeHistory tradeHistory);

}
